<% if resource.errors.any? %>
  <div id="error_explanation">
    <div class="alert alert-danger" role="alert">
      <%= I18n.t("errors.messages.not_saved.other",
                 count: resource.errors.count,
                 resource: resource.class.model_name.human.downcase)
      %>
    </div>

    <ul>
      <% resource.errors.full_messages.each do |message| %>
        <li class="alert alert-danger"><%= message %></li>
      <% end %>
    </ul>
  </div>
<% end %>
